﻿using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using System;
using YXY.Identity.Service.HttpContextUser;

namespace YXY.Identity.Service.Controllers
{
    /// <summary>
    /// 控制器基类
    /// </summary>
    [ApiController]
    public class BaseController : ControllerBase
    {
        /// <summary>
        /// 获取用户信息
        /// </summary>
        protected readonly IHttpContextUser _httpContextUser;
        /// <summary>
        /// 构造函数
        /// </summary>
        /// <param name="applicationContext"></param>
        /// <param name="httpContextUser"></param>
        public BaseController(IHttpContextUser httpContextUser)
        {
            _httpContextUser = httpContextUser;
        }
        /// <summary>
        /// 当前时间
        /// </summary>
        protected static DateTime NowTime
        {
            get
            {
                return DateTime.Now;
            }
        }
    }
}
